<div class="row">
    <div class="col-md-1">
    </div>
    <div class="col-md-10">
        <?php

        if (count($data) > 0) {

            ?>
            <table class="table table-bordered">
                <tr>
                    <th width="5%">No</th>
                    <th>Author</th>
                    <th>Title</th>
                    <th>Description</th>
                    <th>Partial Price</th>
                    <th>Full Price</th>
                    <th width="10%"></th>
                </tr>
                <?php
                $index = 1;
                foreach ($data as $row) {
                    ?>
                    <tr>
                        <td><?php echo $index++; ?></td>
                        <td><?php echo $row['user']['profile']['firstname'] . ' ' . $row['user']['profile']['lastname']; ?></td>
                        <td><?php echo $row['title']; ?></td>
                        <td><?php echo $row['short_description']; ?></td>
                        <td><?php echo $row['partly_price'] == 0 ? '' : $row['partly_price']; ?></td>
                        <td><?php echo $row['full_price'] == 0 ? '' : $row['full_price']; ?></td>
                        <td>
                            <?php echo CHtml::link('Edit', array('/ideality/update', 'id' => $row['id']), array('class' => 'btn btn-info btn-xs')); ?>

                            <?php echo CHtml::link('Delete', '#', array('submit' => array('ideality/delete', 'id' => $row['id']), 'confirm' => 'Are you sure you want to delete this item?', 'class' => 'btn btn-danger btn-xs')); ?>
                        </td>
                    </tr>

                <?php
                }
                ?>
            </table>

        <?php
        }
        if (count($data) == 0) {
            echo 'No data available for this category';
        }
        ?>
    </div>
</div><!-- form -->
<div class='col-md-1'></div>
</div>